import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * A button that calls a certain method in the world.
 * 
 * @author Manuel Nava
 * @version 1.0
 */
public class Ayuda extends Buttons
{
    /**
     * Checks the position and the click of the mouse with the method mouseClicked and getMouseInfo 
     * of the class Greenfoot, and also call the method ayuda of the CaveWorld class.
     */
    public void act() 
    {
        if(Greenfoot.mouseClicked(this)==true)
        if((Greenfoot.getMouseInfo()).getButton()==1)
        {
            int x= (Greenfoot.getMouseInfo()).getX();
            int y= (Greenfoot.getMouseInfo()).getY();
            if(x>getX()-148&&x<getX()+148&&y>getY()-32&&y<getY()+32)
                ((CaveWorld)(getWorld())).ayuda();
        }
    }    
}
